function initPageInfo(page,maxPage,divId){
    $("#"+divId).html("");
    var kongge = "&nbsp;&nbsp;&nbsp;&nbsp;";
    var firstPage = "首页";
    var prePage = "上一页";
    var endPage = "末页";
    var nextPage = "下一页";

    if(page < 1){
        page = 1;
    }
    if(page > maxPage ){
        page = maxPage ;
    }
    if(page == 1 && page < maxPage){
        endPage = "<a href='javascript:;' onclick='beginPostTestResult("+maxPage+")'>末页</a>";
        nextPage =  "<a href='javascript:;' onclick='beginPostTestResult("+(page+1)+")'>下一页</a>";
    }else if(page >1 && page < maxPage){
        firstPage = "<a href='javascript:;' onclick='beginPostTestResult(1)'>首页</a>";
        prePage = "<a href='javascript:;' onclick='beginPostTestResult("+(page-1)+")'>上一页</a>";
        endPage = "<a href='javascript:;' onclick='beginPostTestResult("+maxPage+")'>末页</a>";
        nextPage =  "<a href='javascript:;' onclick='beginPostTestResult("+(page+1)+")'>下一页</a>";
    }else if(page > 1 && page == maxPage){
        firstPage = "<a href='javascript:;' onclick='beginPostTestResult(1)'>首页</a>";
        prePage = "<a href='javascript:;' onclick='beginPostTestResult("+(page-1)+")'>上一页</a>";
    }
    $("#"+divId).html(firstPage+kongge+prePage+kongge+page+kongge+nextPage+kongge+endPage);
}